package jk.spider.api.event.resource;

import jk.spider.api.event.EventVisitor;
import jk.spider.api.event.SpiderEvent;
import jk.spider.model.Resource;

public abstract class ResourceRelatedEvent implements SpiderEvent {
	protected Resource resource;
	
	public ResourceRelatedEvent(Resource resource) {
		this.resource = resource;
	}
	
	public void accept(EventVisitor visitor) {
		visitor.visit(this);
	}
	
	public int getType() {
		return SpiderEvent.EVENT_TYPE_SPIDER;
	}
	
	public Resource getResource() {
		return resource;
	}
}
